Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@smithy/credential-provider-imds
Advanced tools
AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service
The @smithy/credential-provider-imds package is designed to retrieve AWS credentials from the EC2 Instance Metadata Service (IMDS). It allows applications running on EC2 instances to securely obtain temporary credentials without needing to hard-code them. This is particularly useful for managing access to AWS services in a secure and scalable way.
Fetching credentials from IMDS
This feature allows the retrieval of AWS credentials from the EC2 Instance Metadata Service. The provided code sample demonstrates how to asynchronously fetch these credentials using the fromInstanceMetadata function.
const { fromInstanceMetadata } = require('@smithy/credential-provider-imds');
async function getCredentials() {
const credentials = await fromInstanceMetadata();
return credentials;
}
Similar to @smithy/credential-provider-imds, this package is part of the AWS SDK for JavaScript (v3) and provides functionality to obtain AWS credentials from the EC2 Instance Metadata Service. It offers a similar interface but is specifically tailored for use with the AWS SDK v3.
The AWS SDK for JavaScript (v2) includes built-in support for retrieving credentials from various sources, including the EC2 Instance Metadata Service. While it provides broader functionality for interacting with AWS services, it also includes credential management features similar to those in @smithy/credential-provider-imds, but as part of a larger, more comprehensive package.
An internal package
You probably shouldn't, at least directly. Please use @smithy/credential-providers instead.
FAQs
AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service
We found that @smithy/credential-provider-imds demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.